home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / NCTAudioEditor2 ActiveX DLL / NCTAudioEditor2.exe / {app} / Samples / TestVBAudioEditor2 / frmAdvI.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2003-03-28  |  3.8 KB  |  84 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  3. Begin VB.Form frmAdvI 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Advanced Propities"
  6.    ClientHeight    =   825
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   5430
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   825
  14.    ScaleWidth      =   5430
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CheckBox Check1 
  18.       Height          =   315
  19.       Left            =   3195
  20.       TabIndex        =   2
  21.       Top             =   225
  22.       Width           =   825
  23.    End
  24.    Begin MSComctlLib.Slider Slider1 
  25.       Height          =   420
  26.       Left            =   2925
  27.       TabIndex        =   1
  28.       Top             =   225
  29.       Width           =   2355
  30.       _ExtentX        =   4154
  31.       _ExtentY        =   741
  32.       _Version        =   393216
  33.       Max             =   65535
  34.       TickFrequency   =   6000
  35.    End
  36.    Begin VB.ComboBox cmbAdvanced 
  37.       Height          =   315
  38.       Left            =   270
  39.       Style           =   2  'Dropdown List
  40.       TabIndex        =   0
  41.       Top             =   225
  42.       Width           =   2400
  43.    End
  44. Attribute VB_Name = "frmAdvI"
  45. Attribute VB_GlobalNameSpace = False
  46. Attribute VB_Creatable = False
  47. Attribute VB_PredeclaredId = True
  48. Attribute VB_Exposed = False
  49. Private Sub Form_Load() 'this sub starts on loading the form
  50.     Dim i
  51.     Me.Caption = frmDialog.AudioEditor1.DeviceInput.DeviceLines.Name & ": Advanced Properties" 'sets the caption to the device name + "Advance Properties"
  52.     For i = 0 To frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedCount
  53.         cmbAdvanced.AddItem frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedName(i)  'adds advance option's names to the combo list
  54.     Next i
  55.     cmbAdvanced.ListIndex = 0
  56. End Sub
  57. Private Sub Check1_Click()  'this sub starts on clicking the Check1 checkbox
  58.     If Check1.Value = 1 Then 'if the checkbox is marked then
  59.         frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = True  'sets the advance value to true
  60.     Else    'otherwise
  61.         frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = False 'sets the advance avlue to false
  62.     End If
  63.     If frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = False Then Check1.Value = 0 Else Check1.Value = 1
  64. End Sub
  65. Private Sub cmbAdvanced_Click()  'this sub starts on clicking
  66.     Dim Val 'declares the variable that stoes the advance value types
  67.     Val = frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex)   'get the advamce value type of the current device
  68.     If VarType(Val) = vbBoolean Then    'if the value type is boolean then
  69.         Slider1.Visible = False 'hide the slider
  70.         Check1.Visible = True   'shows the checkbox
  71.         Me.Width = 3750 'sets the form width to 3750
  72.         If Val = False Then Check1.Value = 0 Else Check1.Value = 1  'and mark or clear the checkbox
  73.     ElseIf VarType(Val) = vbLong Then   'if the value type is Long then
  74.         Slider1.Visible = True  'shows the slider
  75.         Check1.Visible = False  'hides the checkbox
  76.         Me.Width = 5520 'sets the form width to 5520
  77.         Slider1.Value = Abs(Val)    'sets the slider value
  78.     End If
  79. End Sub
  80. Private Sub Slider1_Click() 'this sub starts on clicking the slider
  81.     frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = Slider1.Value 'sets the advance option value according to the slider one
  82.     Slider1.Value = Abs(frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex))
  83. End Sub
  84.